<!DOCTYPE html><html lang="zh-Hans"><head><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"><meta name="description" content="iOS WKWebView的使用"><meta name="keywords" content=""><meta name="author" content="kyren"><meta name="copyright" content="kyren"><title>iOS WKWebView的使用 | Kyren's Blog</title><link rel="shortcut icon" href="/melody-favicon.ico"><link rel="stylesheet" href="/css/index.css?version=1.9.0"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/font-awesome@latest/css/font-awesome.min.css?version=1.9.0"><meta name="format-detection" content="telephone=no"><meta http-equiv="x-dns-prefetch-control" content="on"><link rel="dns-prefetch" href="https://cdn.jsdelivr.net"><link rel="dns-prefetch" href="https://hm.baidu.com"><script>var _hmt = _hmt || [];
(function() {
  var hm = document.createElement("script");
  hm.src = "https://hm.baidu.com/hm.js?cf87fcdbd9ab7cf93d894f7c219ae78f";
  var s = document.getElementsByTagName("script")[0]; 
  s.parentNode.insertBefore(hm, s);
})();</script><meta http-equiv="Cache-Control" content="no-transform"><meta http-equiv="Cache-Control" content="no-siteapp"><script src="https://v1.hitokoto.cn/?encode=js&amp;charset=utf-8&amp;select=.footer_custom_text" defer></script><script>var GLOBAL_CONFIG = { 
  root: '/',
  algolia: undefined,
  localSearch: {"path":"search.xml","languages":{"hits_empty":"找不到您查询的内容:${query}"}},
  copy: {
    success: '复制成功',
    error: '复制错误',
    noSupport: '浏览器不支持'
  },
  hexoVersion: '6.2.0'
} </script><meta name="generator" content="Hexo 6.2.0"></head><body><i class="fa fa-arrow-right" id="toggle-sidebar" aria-hidden="true"></i><div id="sidebar" data-display="true"><div class="toggle-sidebar-info text-center"><span data-toggle="切换文章详情">切换站点概览</span><hr></div><div class="sidebar-toc"><div class="sidebar-toc__title">目录</div><div class="sidebar-toc__progress"><span class="progress-notice">你已经读了</span><span class="progress-num">0</span><span class="progress-percentage">%</span><div class="sidebar-toc__progress-bar"></div></div><div class="sidebar-toc__content"><ol class="toc"><li class="toc-item toc-level-5"><a class="toc-link" href="#js%E8%B0%83%E7%94%A8OC%EF%BC%9A"><span class="toc-number">1.</span> <span class="toc-text">js调用OC：</span></a></li><li class="toc-item toc-level-5"><a class="toc-link" href="#OC%E8%B0%83%E7%94%A8js%EF%BC%9A"><span class="toc-number">2.</span> <span class="toc-text">OC调用js：</span></a></li></ol></div></div><div class="author-info hide"><div class="author-info__avatar text-center"><img src="https://avatars.githubusercontent.com/u/5827823?v=4"></div><div class="author-info__name text-center">kyren</div><div class="author-info__description text-center">huluo的技术博客</div><div class="follow-button"><a target="_blank" rel="noopener" href="https://github.com/huluo666">Follow Me</a></div><hr><div class="author-info-articles"><a class="author-info-articles__archives article-meta" href="/archives"><span class="pull-left">文章</span><span class="pull-right">239</span></a><a class="author-info-articles__tags article-meta" href="/tags"><span class="pull-left">标签</span><span class="pull-right">41</span></a><a class="author-info-articles__categories article-meta" href="/categories"><span class="pull-left">分类</span><span class="pull-right">29</span></a></div><hr><div class="author-info-links"><div class="author-info-links__title text-center">Links</div><a class="author-info-links__name text-center" target="_blank" rel="noopener" href="http://192.168.2.212:9090/">Jira</a><a class="author-info-links__name text-center" target="_blank" rel="noopener" href="http://192.168.2.212:8090/">Confluence</a><a class="author-info-links__name text-center" target="_blank" rel="noopener" href="http://bloc.leniugame.com/">Leniu</a></div></div></div><div id="content-outer"><div class="no-bg" id="top-container"><div id="page-header"><span class="pull-left"> <a id="site-name" href="/">Kyren's Blog</a></span><i class="fa fa-bars toggle-menu pull-right" aria-hidden="true"></i><span class="pull-right menus">   <a class="site-page" href="/">主页</a><a class="site-page" href="/essay">随笔</a><a class="site-page" href="/archives">归档</a><a class="site-page" href="/tags">标签</a><a class="site-page" href="/categories">分类</a><a class="site-page" href="/about">关于</a></span><span class="pull-right"><a class="site-page social-icon search"><i class="fa fa-search"></i><span> 搜索</span></a></span></div><div id="post-info"><div id="post-title">iOS WKWebView的使用</div><div id="post-meta"><time class="post-meta__date"><i class="fa fa-calendar" aria-hidden="true"></i> 2017-12-22</time></div></div></div><div class="layout" id="content-inner"><article id="post"><div class="article-container" id="post-content"><p>1、WKWebView与js交互</p>
<p>主要有两方面：1、js执行OC代码  2、oc调取写好的js代码</p>
<ul>
<li><h5 id="js调用OC："><a href="#js调用OC：" class="headerlink" title="js调用OC："></a>js调用OC：</h5><p>js是不能执行oc代码的，但是可以变相的执行，js可以将要执行的操作封装到网络请求里面，然后oc拦截这个请求，获取url里面的字符串解析即可，这里用到的代理协议。</p>
<p>主要原理：通过 UIWebVIew 的代理方法截取 web 前端的跳转请求，通过识别与 web 前端约定好的自定义协议头来判断本次请求是否为 JS 调用 Native 的请求，来调用对应的 Native 方法。</p>
<p>​</p>
</li>
</ul>
<figure class="highlight objectivec"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br></pre></td><td class="code"><pre><span class="line"><span class="built_in">UIWebview</span></span><br><span class="line">- (<span class="type">BOOL</span>)webView:(<span class="built_in">UIWebView</span> *)webView shouldStartLoadWithRequest:(<span class="built_in">NSURLRequest</span> *)request navigationType:(<span class="built_in">UIWebViewNavigationType</span>)navigationType</span><br><span class="line">&#123;</span><br><span class="line">  <span class="comment">//拦截请求处理协议</span></span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="built_in">WKWebView</span></span><br><span class="line">- (<span class="type">void</span>)webView:(<span class="built_in">WKWebView</span> *)webView decidePolicyForNavigationAction:(<span class="built_in">WKNavigationAction</span> *)navigationAction decisionHandler:(<span class="type">void</span> (^)(<span class="built_in">WKNavigationActionPolicy</span>))decisionHandler &#123;</span><br><span class="line">  <span class="comment">//拦截请求处理协议</span></span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>

<ul>
<li><h5 id="OC调用js："><a href="#OC调用js：" class="headerlink" title="OC调用js："></a>OC调用js：</h5><p>这里用到UIwebview的一个方法。示例代码:获取网页title：</p>
<figure class="highlight objectivec"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">//返回值为 JS 执行结果，如果 JS 执行失败则返回 nil，如果 JS 执行没有返回值，则返回值为空字符串</span></span><br><span class="line"><span class="meta">#<span class="keyword">pragma</span> mark-----UIWebView WKNavigationDelegate -----</span></span><br><span class="line">- (<span class="type">void</span>)webViewDidFinishLoad:(<span class="built_in">UIWebView</span>*)webView</span><br><span class="line">&#123;</span><br><span class="line">    <span class="built_in">NSString</span>* str = [<span class="keyword">self</span>.webView stringByEvaluatingJavaScriptFromString:<span class="string">@&quot;pageDidLoad()&quot;</span>];</span><br><span class="line">    <span class="built_in">NSLog</span>(<span class="string">@&quot;%@&quot;</span>, str);</span><br><span class="line">    <span class="comment">// 获取网页的title</span></span><br><span class="line"><span class="built_in">NSString</span> *title = [<span class="keyword">self</span>.webView stringByEvaluatingJavaScriptFromString:<span class="string">@&quot;document.title&quot;</span>];</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure></li>
</ul>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br></pre></td><td class="code"><pre><span class="line">pragma mark-----WKWebView WKNavigationDelegate -----</span><br><span class="line">// self.webView.navigationDelegate=self;--WKNavigationDelegate</span><br><span class="line">// javaScriptString 为待执行的 JS 语句</span><br><span class="line">// completionHandler 为执行 JS 完毕后的回调，block 的第一个参数为执行结果，第二个参数为错误</span><br><span class="line">-(void)webView:(WKWebView *)webView didFinishNavigation:(WKNavigation *)navigation</span><br><span class="line">&#123;</span><br><span class="line">[self.webView evaluateJavaScript:@&quot;pageDidLoad()&quot; completionHandler:^(id _Nullable value, NSError* _Nullable error) &#123;</span><br><span class="line">  NSLog(@&quot;%@&quot;, value);</span><br><span class="line">&#125;];</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>



<p>js检查是否安装QQ&amp;&amp;微信</p>
<figure class="highlight objectivec"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">// 创建并配置 WKWebView 的相关参数</span></span><br><span class="line"><span class="built_in">WKWebViewConfiguration</span>* config = [[<span class="built_in">WKWebViewConfiguration</span> alloc] init];</span><br><span class="line"><span class="comment">//检查是否安装微信&amp;&amp;QQ</span></span><br><span class="line"><span class="built_in">NSString</span> *installJS = <span class="string">@&quot;var pcaction=&#123;&#125;; pcaction.isInstallWX=function()&#123;return true&#125;;pcaction.isInstallQQ=function()&#123;return false&#125;;&quot;</span>;</span><br><span class="line"><span class="built_in">WKUserScript</span> *installScript = [[<span class="built_in">WKUserScript</span> alloc] initWithSource:installJS injectionTime:<span class="built_in">WKUserScriptInjectionTimeAtDocumentStart</span> forMainFrameOnly:<span class="literal">NO</span>];</span><br><span class="line">  [config.userContentController addUserScript:installScript];</span><br><span class="line"><span class="built_in">WKWebView</span> *webView=[[<span class="built_in">WKWebView</span> alloc]initWithFrame:<span class="keyword">self</span>.view.bounds configuration:config];</span><br></pre></td></tr></table></figure>

<p>滑动白屏，停止后才渲染页面问题？</p>
<p><a target="_blank" rel="noopener" href="https://stackoverflow.com/questions/39549103/wkwebview-not-rendering-correctly-in-ios-10">https://stackoverflow.com/questions/39549103/wkwebview-not-rendering-correctly-in-ios-10</a></p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line">WKUserContentController:为JS提供了一个发送消息的通道并且可以向页面注入JS的类，WKUserContentController对象可以添加多个scriptMessageHandler；</span><br><span class="line">addScriptMessageHandler:name:有两个参数，第一个参数是userContentController的代理对象，第二个参数是JS里发送postMessage的对象。添加一个脚本消息的处理器</span><br><span class="line">同时需要在html的JS中添加：</span><br><span class="line">window.webkit.messageHandlers.&lt;name&gt;.postMessage(&lt;messageBody&gt;)</span><br><span class="line">才能起作用。</span><br></pre></td></tr></table></figure>



<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">script</span>&gt;</span><span class="language-javascript"></span></span><br><span class="line"><span class="language-javascript">    <span class="comment">//OC调用JS的方法列表</span></span></span><br><span class="line"><span class="language-javascript">    <span class="keyword">function</span> <span class="title function_">alertMobile</span>(<span class="params"></span>) &#123;</span></span><br><span class="line"><span class="language-javascript">        <span class="comment">//这里已经调用过来了 但是搞不明白为什么alert方法没有响应</span></span></span><br><span class="line"><span class="language-javascript">        <span class="comment">//alert(&#x27;我是上面的小黄 手机号是:13300001111&#x27;)</span></span></span><br><span class="line"><span class="language-javascript">        <span class="variable language_">document</span>.<span class="title function_">getElementById</span>(<span class="string">&#x27;mobile&#x27;</span>).<span class="property">innerHTML</span> = <span class="string">&#x27;我是上面的小黄 手机号是:13300001111&#x27;</span></span></span><br><span class="line"><span class="language-javascript">    &#125;</span></span><br><span class="line"><span class="language-javascript">    <span class="keyword">function</span> <span class="title function_">alertName</span>(<span class="params">msg</span>) &#123;</span></span><br><span class="line"><span class="language-javascript">        <span class="comment">//alert(&#x27;你好 &#x27; + msg + &#x27;, 我也很高兴见到你&#x27;)</span></span></span><br><span class="line"><span class="language-javascript">        <span class="variable language_">document</span>.<span class="title function_">getElementById</span>(<span class="string">&#x27;name&#x27;</span>).<span class="property">innerHTML</span> = <span class="string">&#x27;你好 &#x27;</span> + msg + <span class="string">&#x27;, 我也很高兴见到你&#x27;</span></span></span><br><span class="line"><span class="language-javascript">    &#125;</span></span><br><span class="line"><span class="language-javascript">    <span class="keyword">function</span> <span class="title function_">alertSendMsg</span>(<span class="params">num,msg</span>) &#123;</span></span><br><span class="line"><span class="language-javascript">        <span class="comment">//window.alert(&#x27;这是我的手机号:&#x27; + num + &#x27;,&#x27; + msg + &#x27;!!&#x27;)</span></span></span><br><span class="line"><span class="language-javascript">        <span class="variable language_">document</span>.<span class="title function_">getElementById</span>(<span class="string">&#x27;msg&#x27;</span>).<span class="property">innerHTML</span> = <span class="string">&#x27;这是我的手机号:&#x27;</span> + num + <span class="string">&#x27;,&#x27;</span> + msg + <span class="string">&#x27;!!&#x27;</span></span></span><br><span class="line"><span class="language-javascript">    &#125;</span></span><br><span class="line"><span class="language-javascript"></span></span><br><span class="line"><span class="language-javascript">    <span class="comment">//JS响应方法列表</span></span></span><br><span class="line"><span class="language-javascript">    <span class="keyword">function</span> <span class="title function_">btnClick1</span>(<span class="params"></span>) &#123;</span></span><br><span class="line"><span class="language-javascript">        <span class="variable language_">window</span>.<span class="property">webkit</span>.<span class="property">messageHandlers</span>.<span class="property">showMobile</span>.<span class="title function_">postMessage</span>(<span class="literal">null</span>)</span></span><br><span class="line"><span class="language-javascript">    &#125;</span></span><br><span class="line"><span class="language-javascript">    <span class="keyword">function</span> <span class="title function_">btnClick2</span>(<span class="params"></span>) &#123;</span></span><br><span class="line"><span class="language-javascript">        <span class="variable language_">window</span>.<span class="property">webkit</span>.<span class="property">messageHandlers</span>.<span class="property">showName</span>.<span class="title function_">postMessage</span>(<span class="string">&#x27;xiao黄&#x27;</span>)</span></span><br><span class="line"><span class="language-javascript">    &#125;</span></span><br><span class="line"><span class="language-javascript">    <span class="keyword">function</span> <span class="title function_">btnClick3</span>(<span class="params"></span>) &#123;</span></span><br><span class="line"><span class="language-javascript">        <span class="variable language_">window</span>.<span class="property">webkit</span>.<span class="property">messageHandlers</span>.<span class="property">showSendMsg</span>.<span class="title function_">postMessage</span>([<span class="string">&#x27;13300001111&#x27;</span>, <span class="string">&#x27;Go Climbing This Weekend !!!&#x27;</span>])</span></span><br><span class="line"><span class="language-javascript">    &#125;</span></span><br><span class="line"><span class="language-javascript"></span><span class="tag">&lt;/<span class="name">script</span>&gt;</span></span><br></pre></td></tr></table></figure>





<p><a target="_blank" rel="noopener" href="http://www.cocoachina.com/bbs/read.php?tid-1712564-page-2.html">主题 : WKWebView 与js交互问题 已解决</a></p>
<p><a target="_blank" rel="noopener" href="http://www.cocoachina.com/bbs/read.php?tid-1722961.html">主题 : wkwebview怎么注入一个js对象，让h5那边可以轮询检测到</a></p>
<p><a target="_blank" rel="noopener" href="https://stackoverflow.com/questions/26778955/wkwebview-evaluate-javascript-return-value">WKWebView evaluate JavaScript return value</a></p>
<p><code>WKWebView</code></p>
<p><a target="_blank" rel="noopener" href="https://github.com/My-Old-Driver/WKWebView">https://github.com/My-Old-Driver/WKWebView</a></p>
<p><a target="_blank" rel="noopener" href="https://github.com/devedbox/AXWebViewController">https://github.com/devedbox/AXWebViewController</a></p>
<p><a target="_blank" rel="noopener" href="https://github.com/li6185377/IMYWebView">https://github.com/li6185377/IMYWebView</a></p>
<p><a target="_blank" rel="noopener" href="https://github.com/giveMeHug/SDWebView">https://github.com/giveMeHug/SDWebView</a></p>
<p><a target="_blank" rel="noopener" href="https://github.com/LSure/SureWebViewController">https://github.com/LSure/SureWebViewController</a></p>
<p><a target="_blank" rel="noopener" href="https://github.com/dlwj15/wkwebview">https://github.com/dlwj15/wkwebview</a></p>
<p><a target="_blank" rel="noopener" href="https://github.com/huos3203/WKWebView-JS">https://github.com/huos3203/WKWebView-JS</a></p>
<p>基于WKWebView和UIWebView实现的仿微信WebView功能的页面加载库</p>
<p><a target="_blank" rel="noopener" href="https://github.com/DoTalkLily/LYWebViewController">https://github.com/DoTalkLily/LYWebViewController</a></p>
<p><a target="_blank" rel="noopener" href="https://github.com/JixinZhang/WKWebProgressViewDemo">https://github.com/JixinZhang/WKWebProgressViewDemo</a></p>
<p><a target="_blank" rel="noopener" href="https://github.com/hdq135/JsWebView">https://github.com/hdq135/JsWebView</a><br>jsbridge 接口对象和webview对象交互用的工具。 JsfFromOCClass 把oc代码转化为js代码，只转化以“js_”开头的代码 JsWebView 配置webview注入js代码，并处理js调用原生接口</p>
<p>ios android 共用appInterface.jsCallApp方法,无需多平台区别</p>
<ul>
<li><a target="_blank" rel="noopener" href="https://github.com/sfwan2014/WKWebViewDemo">https://github.com/sfwan2014/WKWebViewDemo</a></li>
</ul>
<p>wkwebview</p>
<p><a target="_blank" rel="noopener" href="https://www.zybuluo.com/Sweetfish/note/501575">iOS中JS与OC相互调用的方式</a></p>
<p><a target="_blank" rel="noopener" href="http://boyers.coding.me/2017/07/07/iOS/WKWebView%E6%8E%A7%E4%BB%B6%E5%92%8CJS%E8%84%9A%E6%9C%AC%E4%BC%A0%E5%8F%82%E5%8F%8A%E4%BA%A4%E4%BA%92/">WKWebView控件和JS脚本传参及交互</a></p>
<p><a target="_blank" rel="noopener" href="https://github.com/Xcoder1011/WebView-JS">https://github.com/Xcoder1011/WebView-JS</a></p>
<p><a target="_blank" rel="noopener" href="https://github.com/giveMeHug/SDWebView">https://github.com/giveMeHug/SDWebView</a></p>
<p><a target="_blank" rel="noopener" href="https://github.com/zengweizhen/WKWebView">https://github.com/zengweizhen/WKWebView</a></p>
<p><a target="_blank" rel="noopener" href="https://github.com/hongruqi/WTWebView">https://github.com/hongruqi/WTWebView</a></p>
<p><a target="_blank" rel="noopener" href="http://iliunian.cn/14684585476236.html">http://iliunian.cn/14684585476236.html</a></p>
<p><a target="_blank" rel="noopener" href="http://www.cnblogs.com/coolwxb/p/6125920.html">http://www.cnblogs.com/coolwxb/p/6125920.html</a></p>
<p><a target="_blank" rel="noopener" href="http://blog.csdn.net/hmh007/article/details/53126809">JS与OC互相调用的一百种方法(包括WKWebView和UIWebView)</a></p>
<p><a target="_blank" rel="noopener" href="https://www.jianshu.com/p/86d99192df68">【iOS】WKWebView 使用及注意事项</a></p>
<p><a target="_blank" rel="noopener" href="https://www.jianshu.com/p/39401c9e5ea3">https://www.jianshu.com/p/39401c9e5ea3</a></p>
<p><a target="_blank" rel="noopener" href="https://www.jianshu.com/p/64b4f01ad064">OC与JS代码交互原理(混合开发，包含UIWebView、WKWebView)</a></p>
<p><a target="_blank" rel="noopener" href="https://www.jianshu.com/p/e537e6587274">iOS开发 - WKWebView使用详解</a></p>
<p><a target="_blank" rel="noopener" href="http://peilinghui.com/2017/05/05/%E5%AD%A6%E4%B9%A0iOS%E4%B8%ADJS%E4%B8%8EOC%E7%9B%B8%E4%BA%92%E8%B0%83%E7%94%A8%E7%9A%84%E6%96%B9%E5%BC%8F/">http://peilinghui.com/2017/05/05/%E5%AD%A6%E4%B9%A0iOS%E4%B8%ADJS%E4%B8%8EOC%E7%9B%B8%E4%BA%92%E8%B0%83%E7%94%A8%E7%9A%84%E6%96%B9%E5%BC%8F/</a></p>
<p>JS与原生OC互相调用的Demo</p>
<ul>
<li><a target="_blank" rel="noopener" href="https://github.com/Haley-Wong/JS_OC">https://github.com/Haley-Wong/JS_OC</a></li>
</ul>
<p><a target="_blank" rel="noopener" href="https://stackoverflow.com/questions/9473582/ios-javascript-bridge">https://stackoverflow.com/questions/9473582/ios-javascript-bridge</a></p>
</div></article><div class="post-copyright"><div class="post-copyright__author"><span class="post-copyright-meta">文章作者: </span><span class="post-copyright-info"><a href="mailto:undefined">kyren</a></span></div><div class="post-copyright__type"><span class="post-copyright-meta">文章链接: </span><span class="post-copyright-info"><a href="http://huluo666.gitee.io/2017/12/22/WKWebView的使用/">http://huluo666.gitee.io/2017/12/22/WKWebView的使用/</a></span></div><div class="post-copyright__notice"><span class="post-copyright-meta">版权声明: </span><span class="post-copyright-info">本博客所有文章除特别声明外，均采用 <a target="_blank" rel="noopener" href="https://creativecommons.org/licenses/by-nc-sa/4.0/">CC BY-NC-SA 4.0</a> 许可协议。转载请注明来自 <a href="http://huluo666.gitee.io">Kyren's Blog</a>！</span></div></div><div class="post-meta__tag-list"></div><nav id="pagination"><div class="prev-post pull-left"><a href="/2017/12/25/iOS%E5%8F%82%E8%80%83%E5%8A%A8%E7%94%BB/"><i class="fa fa-chevron-left">  </i><span>iOS参考动画</span></a></div><div class="next-post pull-right"><a href="/2017/12/22/WebRTC%E7%9B%B4%E6%92%AD%E7%9B%B8%E5%85%B3/"><span>iOS webrtc相关</span><i class="fa fa-chevron-right"></i></a></div></nav></div></div><footer><div class="layout" id="footer"><div class="copyright">&copy;2022 By kyren</div><div class="framework-info"><span>驱动 - </span><a target="_blank" rel="noopener" href="http://hexo.io"><span>Hexo</span></a><span class="footer-separator">|</span><span>主题 - </span><a target="_blank" rel="noopener" href="https://github.com/Molunerfinn/hexo-theme-melody"><span>Melody</span></a></div><div class="footer_custom_text">hitokoto</div><div class="busuanzi"><script async src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script><span id="busuanzi_container_page_pv"><i class="fa fa-file"></i><span id="busuanzi_value_page_pv"></span><span></span></span></div></div></footer><i class="fa fa-arrow-up" id="go-up" aria-hidden="true"></i><script src="https://cdn.jsdelivr.net/npm/animejs@latest/lib/anime.min.js"></script><script src="https://cdn.jsdelivr.net/npm/jquery@latest/dist/jquery.min.js"></script><script src="https://cdn.jsdelivr.net/npm/@fancyapps/fancybox@latest/dist/jquery.fancybox.min.js"></script><script src="https://cdn.jsdelivr.net/npm/velocity-animate@latest/velocity.min.js"></script><script src="https://cdn.jsdelivr.net/npm/velocity-ui-pack@latest/velocity.ui.min.js"></script><script src="/js/utils.js?version=1.9.0"></script><script src="/js/fancybox.js?version=1.9.0"></script><script src="/js/sidebar.js?version=1.9.0"></script><script src="/js/copy.js?version=1.9.0"></script><script src="/js/fireworks.js?version=1.9.0"></script><script src="/js/transition.js?version=1.9.0"></script><script src="/js/scroll.js?version=1.9.0"></script><script src="/js/head.js?version=1.9.0"></script><script src="/js/search/local-search.js"></script><script>if(/Android|webOS|iPhone|iPod|iPad|BlackBerry/i.test(navigator.userAgent)) {
  $('#nav').addClass('is-mobile')
  $('footer').addClass('is-mobile')
  $('#top-container').addClass('is-mobile')
}</script><div class="search-dialog" id="local-search"><div class="search-dialog__title" id="local-search-title">本地搜索</div><div id="local-input-panel"><div id="local-search-input"><div class="local-search-box"><input class="local-search-box--input" placeholder="搜索文章"></div></div></div><hr><div id="local-search-results"><div id="local-hits"></div><div id="local-stats"><div class="local-search-stats__hr" id="hr"><span>由</span> <a target="_blank" rel="noopener" href="https://github.com/wzpan/hexo-generator-search" style="color:#49B1F5;">hexo-generator-search</a>
 <span>提供支持</span></div></div></div><span class="search-close-button"><i class="fa fa-times"></i></span></div><div class="search-mask"></div></body></html>